home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1995-12-20 | 962 b | 53 lines |
- Degree
- Screen Open 0,320,256,2,0
- Curs Off : Flash Off : Paper 0 : Pen 1 : Cls
- Reserve As Work 9,514
- ST=Start(9)
- For A=0 To 512
- Poke ST+A,((Atan(A/512.0)*1024))/360
- Next
- Do
- MX=X Screen(X Mouse)
- MY=Y Screen(Y Mouse)
- Wait Vbl
- Cls
- DX=(160-MX)
- DY=(100-MY)
- If DX<>0
- W=Atan(((DY*256)/DX)/256.0)
- Else
- If DY<0
- W=90
- Else
- W=270
- End If
- End If
- If DX>0 Then Add W,180
- W=(W+360) mod 360
- Draw 160,100 To 160+Cos(W)*16,100+Sin(W)*16
- Locate 0,20 : Print W;
- ' NEW TAN!
- If DX=>0 Then XABS=DX Else XABS=-DX
- If DY=>0 Then YABS=DY Else YABS=-DY
- If YABS<=XABS
- WW=Peek(ST+(YABS*512)/XABS)+512
- Else
- WW=768-Peek(ST+(XABS*512)/YABS)
- End If
- If DX=>0
- If DY>0
- W=WW
- Else
- W=-WW
- End If
- Else
- If DY>0
- W=512-WW
- Else
- W=WW-512
- End If
- End If
- W=W and $3FF
- Draw 120,100 To 120+ Extension_8_1114(W,16),100+ Extension_8_1106(W,16)
- Print(W*360)/1024
- Loop